﻿@model BTKERP.Model.Warehouse

@{
    ViewBag.Title = "Warehouse";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>New Warehouse</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Warehouse</legend>
        <table class="display stylized">
            <tbody>
                <tr>
                    <td>
                         <div class="editor-label">
                            @Html.LabelFor(model => model.Name)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Name)
                            @Html.ValidationMessageFor(model => model.Name)
                        </div>
                    </td>
                    <td>
                         <div class="editor-label">
                            @Html.LabelFor(model => model.Descriptoin)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Descriptoin)
                            @Html.ValidationMessageFor(model => model.Descriptoin)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.Address1)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Address1)
                            @Html.ValidationMessageFor(model => model.Address1)
                        </div>
                    </td>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.Address2)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Address2)
                            @Html.ValidationMessageFor(model => model.Address2)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.Address3)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Address3)
                            @Html.ValidationMessageFor(model => model.Address3)
                        </div>
                    </td>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.PostCode)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.PostCode)
                            @Html.ValidationMessageFor(model => model.PostCode)
                        </div>                 
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.Tel)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Tel)
                            @Html.ValidationMessageFor(model => model.Tel)
                        </div>
                    </td>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.Fax)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Fax)
                            @Html.ValidationMessageFor(model => model.Fax)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                         <div class="editor-label">
                            @Html.LabelFor(model => model.ContactPerson)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.ContactPerson)
                            @Html.ValidationMessageFor(model => model.ContactPerson)
                        </div>
                    </td>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.CoutryId)
                        </div>
                        <div class="editor-field">
                            @Html.DropDownListFor(model => model.CoutryId, (SelectList)ViewData["CountryList"])
                            @Html.ValidationMessageFor(model => model.CoutryId)
                        </div>    
                    </td>
                </tr>
                <tr>
                    <td>
                         <div class="editor-label">
                            @Html.LabelFor(model => model.CityId)
                        </div>
                        <div class="editor-field">
                            @Html.DropDownListFor(model => model.CityId, (SelectList)ViewData["CitiyList"])
                            @Html.ValidationMessageFor(model => model.CityId)
                        </div>
                    </td>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.IsCentral)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.IsCentral)
                            @Html.ValidationMessageFor(model => model.IsCentral)
                        </div>
                    </td>
                    </tr>
            </tbody>
        </table>
  

        <p>
            <input type="submit" value="Save" class="btn btn-green"/>
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
